package com.fudan.framework.base.i;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.fudan.framework.base.BaseController.PageBean;

/**
 * 通用dao接口
 * @author Xuxinxing
 *
 * @param <T>
 */
public interface IDaoService<T> {

	public Boolean add(T t);
	public Boolean addAll(Iterable<T> entities);
	public Boolean update(T t);
	public Boolean updateBatch(List<T> entities);
	public T get(Object id);
	public Boolean delete(String id);
	public Boolean deleteBatch(List<T> entities);
	public long countAll();
	public List<T> pages(HttpServletRequest request);
	public List<T> findAllByFuzzyQuery(HttpServletRequest request);
	public List<T> findAllByFuzzyQuery(String fieldName,String value,int page,int size);
	public List<T> findAllByFuzzyQuery(String fieldName,String value,PageBean pageBean);
}
